-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't force-exit after tests have completed #3260
Conversation
The assertion message is different, which requires more creativity with the snapshots.
This is a non trivial breaking change. We relied heavily on the feature of ava where we didnt have to tear down any database connections etc and it would kill the process when the tests are done. |
Unfortunately it caused hard to understand errors in Node where it wouldn't exit at all. Can you close these in an after hook? If that is problematic due to the restrictions on test declarations we could come up with another mechanism, say an event when it's safe to force the exit? |
I'm facing with this too – It seems to me a mechanism should be provided in order to be possible to achieve this in a explicit way (see #3259 (comment)) |
I fully understand that is the case, this is why i've written or used other test frameworks that don't autoclose. Going from autoclose to not autoclose is such a large breaking change you might as well switch test frameworks. In fact it's probably cheaper and quicker for me to port the tests to |
@Raynos @Kikobeats I think a Other use cases are as a cleanup routine that sits outside of AVA's test & hook logic. I'm leaning to a solution like this over configuration because configuration implies we can handle edge cases in Node.js and we can't. |
Fixes #1718.
With worker threads, this seems to stop AVA from detecting that the thread has exited, causing a hang.
Also remove flush logic implemented in #1722. Let's hope that current Node.js versions are better at flushing IPC before exiting.
To do: add a testChange is mainly visible in reporters which don't have great tests